﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0056)http://dsportal.sd.sgcc.com.cn/portal/tlogin.jsp?dsdw=rz -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT>
function getCookie(name){

            var strCookie=document.cookie;
            var arrCookie=strCookie.split("; ");

            for(var i=0;i<arrCookie.length;i++){

                  var arr=arrCookie[i].split("=");

                  if(arr[0]==name){
					  return arr[1];
				  }
            }
            return "";
}
</SCRIPT>

<SCRIPT language=JavaScript> 
<!--

function addNewCookie(name,value,expiredate){

           var cookieString = name + "=" + escape(value);
        
            document.cookie = cookieString;
}

function addCookie(name,value,expiredate){

           var cookieString = name + "=" + escape(value);
          
            var date=new Date();
				
            date.setTime(date.getTime() + expiredate*24*3600*1000);
				  
            cookieString = cookieString +";expires="+date.toGMTString();

            document.cookie = cookieString;
}

function deleteCookie(name){
             var date=new Date();
             date.setTime(date.getTime()-100000 * (24 * 60 * 60 * 1000));
             document.cookie=name+"=; expires="+date.toGMTString();
}
function saveCookis(){
		var loginId = document.ldap_login_form.loginId.value;
		var password = document.ldap_login_form.password.value;

		var isSaveCookis = document.ldap_login_form.isSaveCookis.checked;

		if(isSaveCookis == true){//保存cookis
			addCookie("loginId",loginId,60);
			addCookie("password",password,60);
			addCookie("isChecked","true",10000);
		}
		else{
			deleteCookie("loginId");
			deleteCookie("password");

			addCookie("isChecked","false",10000);
		}
}
function cookisExist(){
	
	var loginId = getCookie("loginId");
	var password = getCookie("password");
	var isChecked = getCookie("isChecked");

	//alert("loginId = "+loginId+" password = "+password +"isChecked = "+isChecked);

	if(loginId != '' && password != ''){//cookis存在时   在这里应该判断用户名和密码是否正确
		 document.ldap_login_form.loginId.value = loginId;
		 document.ldap_login_form.password.value = password;	
		 
		 document.ldap_login_form.isSaveCookis.checked = isChecked;//check it or not 
		// alert(" ok ok !");
	}	
}
//-->
    </SCRIPT>

<META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
<BODY>
<TABLE style="BACKGROUND-POSITION: left top; BACKGROUND-REPEAT: no-repeat" 
height=100 cellSpacing=0 cellPadding=0 width=179 
background=images/yhdl_03.gif border=0><!--<tr>
        <td><img src="/images/d-gsdl.gif"></td>
      </tr>
      --><!-- <tr>
        <td><img src="http://10.141.2.47/skins/newsepco/newsepco/images/yhdl.jpg"></td>
      </tr>
	  -->
  <TBODY>
  <TR>
    <TD height=25></TD></TR>
  <TR>
    <FORM id=ldap_login_form name=ldap_login_form 
    action=loginEx!loginEx.do method=post 
    target=_top><INPUT id=isSavePwd type=hidden value=false name=isSavePwd> 
    <INPUT type=hidden 
    value=http://dsportal.sd.sgcc.com.cn/portal/v3login/v3loginAG.jsp?portalPath=sepco 
    name=target> 
    <TD height=38>
      <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
        <TBODY>
        <TR>
          <TD 
            style="PADDING-LEFT: 6px; FONT-SIZE: 12px; TEXT-DECORATION: none">用户名:</TD>
          <TD><INPUT id=loginId 
            style="WIDTH: 115px; HEIGHT: 20px; TEXT-ALIGN: left" 
            name=loginId></TD></TR>
        <TR>
          <TD 
            style="PADDING-LEFT: 6px; FONT-SIZE: 12px">密&nbsp;&nbsp;&nbsp;&nbsp;码:</TD>
          <TD><INPUT id=password 
            style="WIDTH: 115px; HEIGHT: 20px; TEXT-ALIGN: left" type=password 
            name=password></TD></TR>
        <TR>
          <TD colSpan=2>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD style="PADDING-LEFT: 10px" width="16%"><INPUT 
                  id=isSaveCookis type=checkbox name=isSaveCookis></TD>
                <TD style="FONT-SIZE: 11px" width="44%">记住密码</TD><!--<td width="40%" ><input type="image" src="/images/d-button-dl.gif" onclick="denglu()"></td>
              -->
                <TD width="40%" height=19><INPUT onclick=denglu() type=image 
                  src="images/dlan.jpg"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></FORM></TR></TBODY></TABLE>
<SCRIPT language=JavaScript>

	cookisExist();	
	//把自动填写的英文信息换成中文	
	function go()	{	  
		if(event.keyCode == 13)	   {		  
			var t = event.srcElement.name;		  
			if(t == "password" || t == "button")			 
			denglu();		  
			else			 
				event.keyCode = 9;	   
			}	
		}		
	function denglu()	{	   
		var t = ldap_login_form.loginId;	   
		t.value = trim(t.value);	   
		if(t.value == "")	   {		  
			alert("请输入用户名！");		  
			t.focus();		  
			return;	   
		}	   	   
		t = ldap_login_form.password;	   
		t.value = trim(t.value);	   
		if(t.value == "")	   {		  
			alert("请输入密码！");		  
			t.focus();		  
			return;	   
		}		 
		saveCookis();
		// add by wang	   
		ldap_login_form.submit();	
		}		
	function clickReset()	{		
		document.ldap_login_form.loginId.value="";		
		document.ldap_login_form.password.value="";		
		document.ldap_login_form.loginId.focus();	
		}		
	function trim(str)	{		
		return str.replace(/(^\s*)|(\s*$)/g, "");	
		}
		
     //设置cookie,以判断返回到新的登录后还是旧的登录后。
		
		var sendurlparam2 ='rz';
		
		var sendurlparam4=sendurlparam2+'_v3';
		document.getElementById("target").value="http://dsportal.sd.sgcc.com.cn/portal/v3login/v3loginAG.jsp?portalPath="+sendurlparam4;
	
	</SCRIPT>
</BODY></HTML>
